using Microsoft.EntityFrameworkCore;
namespace Student1.Models;

public class StudentDbContext : DbContext
{
    public DbSet<Student>Students{get;set;}=null!;

    protected override void OnConfiguring(DbContextOptionsBuilder dbContextOptons)
    {
        base.OnConfiguring(dbContextOptons);
        var conString=$"server=.\\SQLEXPRESS;database=Student;uid=sa;pwd=123456;TrustServerCertificate=true;";
        dbContextOptons.UseSqlServer(conString);
    }
}